package com.example.shardingsphere;

/**
 * describe:
 *
 * @author lianying
 * @date 2023/05/05
 */
public class User implements Comparable<User>{
    private Long id;
    private Integer age;
    private String name;

    @Override
    public int compareTo(User o) {
        return this.age-o.getAge();
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
